<template>
	<div>
		<h3>现在是数据是：{{this.$store.state.count}}</h3>
		<el-button type="success" @click='handlebtn1'>+1</el-button>
		<el-button type="success" @click='addAsync'>+1</el-button>
	</div>
</template>

<script>
	
	import {mapActions} from 'vuex' 
	
	export default{
		data(){
			return{
				
			}
		},
		methods:{	
			handlebtn1(){
				this.$store.commit('add1')	
			},
			...mapActions(['addAsync'])
			
			// handlebtn2(){
			// 	this.$store.dispatch('addAsync')
			// }
		}
	}
</script>

<style>
</style>
